﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShivamEMR.Model.Domain.PersonDomain;
using ShivamEMR.Model.Domain.CompanyDomain;
using System.ComponentModel.DataAnnotations;

namespace ShivamEMR.Model.Domain.ContactsDomain
{
  public  class Address
    {
        #region Properties
        public Guid ID { get; set; }
        public string Address1 { get; set; }
        public string Address2 { get; set; }
        public string Landmark { get; set; }
        public string ZipCode { get; set; }
        public string Notes { get; set; } 
        #endregion


        #region ForeignKeyProperties
        public int AddressTypeID { get; set; }
        public Guid CityID { get; set; }
        public Guid TerritoryID { get; set; }
        public int CountryID { get; set; }
        public int CompanyID { get; set; }
        public int BranchID { get; set; }
        #endregion


        #region NavigationalProperties
      [ForeignKey("AddressTypeID")]
        public virtual AddressType AddressType { get; set; }
       [ForeignKey("CityID")]
        public virtual City City { get; set; }
       [ForeignKey("TerritoryID")]
        public virtual Territory Territory { get; set; }
       [ForeignKey("CountryID")]
        public virtual Country Country { get; set; }

       [ForeignKey("CompanyID")]
        public virtual Company Company { get; set; }
       [ForeignKey("BranchID")]
        public virtual Branch Branch { get; set; }
        public virtual ICollection<Person> Persons { get; set; }
        
        #endregion
    }
}
